<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>重叠的元素</title>
    <style>
        img {
            position: absolute;
            left: 0px;
            top: 0px;
            z-index: -1;
        }
    </style>
</head>

<body>
    <h1>This is a heading</h1>
    <img src="https://www.runoob.com/try/demo_source/w3css.gif" width="100" height="140" />
    <p>因为图像元素设置了 z-index 属性值为 -1, 所以它会显示在文字之后。</p>
</body>

</html>